import { get, post } from '@/utils/request'
const BASE_URL = window.baseUrl.asset
// 分页查询
export function queryPageList(query) {
  return post(BASE_URL + '/assetsOrg/page', query)
}
export function entityTree(id) {
  return get(BASE_URL + '/assetsOrg/treeselect', { id })
}

export function zoneTree(id) {
  return get(BASE_URL + '/assetsOrg/zoneselect', { id })
}
// 字典集合
export function getOrgTypeList(itemType) {
  return get(BASE_URL + '/dictItems/listByType', { itemType })
}

export function addDatas(query) {
  return post(BASE_URL + '/assetsOrg/add', query)
}

export function queryById(id) {
  return get(BASE_URL + '/assetsOrg/detail', { id })
}
export function editDatas(query) {
  return post(BASE_URL + '/assetsOrg/update', query)
}

export function deleteDatas(ids) {
  return get(BASE_URL + '/assetsOrg/deleteBatch', { ids })
}

export function exportDatas(query) {
  return post(BASE_URL + '/assetsOrg/export', query)
}

// 导出模板
export function importTemplate() {
  return post(BASE_URL + '/assetsOrg/export')
}
// 导出数据

// 导入数据
export function importData(file) {
  return post(BASE_URL + '/assetsOrg/importData', { file })
}

export function queryByOrder() {
  return get(BASE_URL + '/assetsOrg/queryByOrder')
}
